///////////////////////////////////////////////////////////
//  CCreateItemView.h
//  Implementation of the Class CCreateItemView
//  Created on:      21-Sep-2013 9:37:27 AM
//  Original author: Jakkaphan Aiemcharoenjit
///////////////////////////////////////////////////////////

#if !defined(EA_D7823E3B_6092_44db_8519_9E19408F364A__INCLUDED_)
#define EA_D7823E3B_6092_44db_8519_9E19408F364A__INCLUDED_

#include "IViewCtrl.h"
#include "IHeader.h"
#include "Item.h"
#include "IWindowDirector.h"

using namespace Data;

namespace UI
{
class CCreateItemView : public IViewCtrl
{

public:
  CCreateItemView(IWindowDirector* director);
	virtual ~CCreateItemView();
	virtual IViewCtrl::ViewType GetType() const;
	virtual void Initialize();
	virtual void Refresh();
	virtual void ShowView(bool show = true);
	void OnClickedBack();
	void OnClickedOK();
	IObject* CreateData();
	std::string GetNameLabel();
	void SetNameLabel(const std::string& text);
	void SetItemType(IObject::ObjectType _type);
	void ItemTypeEnable(bool enable);
  void SetTitleView(const std::string& text);
  void SetCurListBox(int index);

private:
  bool OnClickedNevigationBar(CNavigationBar* navigationBar, int button);
  bool OnClickedView(CView* view);

private:
	IViewCtrl::ViewType       m_type;
	IWindowDirector*          m_parrentWnd;
  CNavigationBarPtr         m_navigationBar;
  CTextFieldPtr             m_textField;
  CListBoxPtr               m_listBox;
};
}
#endif // !defined(EA_D7823E3B_6092_44db_8519_9E19408F364A__INCLUDED_)
